<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>sprox_desfire_write_c.html</title>
<!-- Source : c:/temp/desfire/sprox_desfire_write.c -->
<!-- Doc generated on Thu Jun 24 12:26:35 2010 by johann on PC_DEV_5 -->
<!-- Generated with ROBODoc Version 4.99.8 (Specific build by PRO ACTIVE - Apr 13 2010) -->
<style type="text/css">
body
{
  background-color: #ffffff;
  color: #000000;
  font-family: Verdana, Geneva, Lucida, Arial, Helvetica, sans-serif;
  font-size: 9pt;
  margin-left: 60px;
  margin-right: 40px;  
}
table
{
  border-collapse: collapse;
  border-style: solid;
  border-width: 1px;
  border-color: #000000;
  margin-bottom: 12px;
}
td
{
  font-family: Verdana, Geneva, Lucida, Arial, Helvetica, sans-serif;
  font-size: 9pt;
  vertical-align: top;
  padding-right: 6px;
  border-style: solid;
  border-width: 1px;
  border-color: #dddddd; 
}
th
{
  font-family: Verdana, Geneva, Lucida, Arial, Helvetica, sans-serif;
  font-size: 9pt;
  vertical-align: top;  
  padding-right: 6px;
  border-style: solid;
  border-width: 1px;
  border-color: #000000;
  background-color: #dddddd;  
}
h1
{
  font-family: Verdana, Geneva, Lucida, Arial, Helvetica, sans-serif;
  font-size: 18pt;
  font-weight: bold;
  margin-bottom: 36px;
  color: #000000;
  margin-left: -40px;
}
h2
{
  font-family: Verdana, Geneva, Lucida, Arial, Helvetica, sans-serif;
  font-size: 12pt;
  font-weight: bold;
  margin-top: 48px;
  margin-bottom: 24px;
  padding-top: 2px;
  padding-bottom: 2px;
  background-color: #dddddd;
  color: #000000;
  margin-left: -40px;
}
h3
{
  font-family: Verdana, Geneva, Lucida, Arial, Helvetica, sans-serif;
  font-size: 11pt;
  font-weight: bold;
  margin-top: 36px;
  margin-bottom: 24px; 
  border-style: none;
  border-top-style: solid;  
  border-width: 1px;
  border-color: #cccccc; 
  margin-left: -40px;
}
h4
{
  font-family: Verdana, Geneva, Lucida, Arial, Helvetica, sans-serif;
  font-size: 11pt;
  font-weight: bold;
  margin-top: 24px;
  margin-bottom: 12px;  
}
h5
{
  font-family: Verdana, Geneva, Lucida, Arial, Helvetica, sans-serif;
  font-size: 9pt;
  font-weight: bold;
  margin-top: 12px;
  margin-bottom: 2px;  
}
a
{
  color: #0000ff;
}
p
{
  margin-top: 0px;
  margin-bottom: 6px;  
  width: 600px;
  text-align: justify;
}
ul
{
  margin-top: 0px;
  margin-bottom: 6px;  
  width: 600px;
  text-align: justify;
}
li
{
  margin-top: 0px;
  margin-bottom: 6px;  
  width: 550px;
  text-align: justify;
}
tt
{
  font-family: Courier, Courier New;
  font-size: 10pt;
}
pre
{
  background-color: #ffffff;
  color: #000000;
  font-size: 10pt;
}
.NAV
{
  font-size: 7pt;
}
a.NAV
{
  color: #0000cc;
}
.TOC
{
  font-size: 9pt;
  color: #888888;
}
a.TOC
{
  color: #0000ff;
}
.INDEX
{
  font-size: 9pt;
}
a.INDEX
{
  color: #0000ff;
}
.TYPE
{
  font-size: 7pt;
  color: #888888;
}
.ITEM
{
  font-weight: bold;
  color: #000088;
}
.LABEL
{
  color: #000088;
}
.HISTORY
{
  color: #006600;
}
.AUTHOR
{
  color: #006600;
}
.COPYRIGHT
{
  color: #006600;
}
.PORTABILITY
{
  color: #006600;
}
.WARNING
{
  color: #aa0000;
}

.bitinfo
{
  width: 60px;
  font-style: italic;
  text-align: center;
}

.bitnum
{
  text-align: center;
}

.bitname
{
  font-weight: bold;
  text-align: center;
}

.tabitem
{
  width: 100px;
}

.tabname
{
  width: 200px;
}

.tabdesc
{
  width: 450px;
}

.value
{
  font-family: courier;
  text-align: right;
}

.tabsepar
{
  border-top-style: solid;
  border-bottom-style: solid;
  border-width: 2px;
  border-color: #888888;
  font-style: italic;
  text-align: center;
}
</style>
</head>
<body bgcolor="#FFFFFF">
<a name="robo_top_of_doc"></a>
<h3 align="center">TABLE OF CONTENTS</h3>
<ul>
<li><a class="TOC" href="#robo20">Write</a></li>
<li><a class="TOC" href="#robo121">WriteData</a></li>
<li><a class="TOC" href="#robo122">WriteData2</a></li>
</ul>
<h3>&nbsp;</h3>


<h1><a name="robo20"><span class="TYPE">[Modules]</span><a class="LABEL" name="Write">
Write</a></h1>

<p class="NAV">[<a class="NAV" href="#robo_top_of_doc">top</a>][<a class="NAV" href="./modules.html#top">index</a>]</p>
<p class="ITEM">NAME</p>
<span class="NAME"><pre class="NAME">   DesfireAPI :: Core of the writing functions
</pre>
</span><p class="ITEM">COPYRIGHT</p>
<span class="COPYRIGHT"><pre class="COPYRIGHT">   (c) 2009 SpringCard - <a href="http://www.springcard.com">www.springcard.com</a>
</pre>
</span><p class="ITEM">DESCRIPTION</p>
<span class="DESCRIPTION"><pre class="DESCRIPTION">   Implementation of the various DESFIRE write functions.
</pre>
</span>


<h2><a name="robo121"><span class="TYPE">[Functions]</span><a class="LABEL" name="WriteData">
WriteData</a></h2>

<p class="NAV">[<a class="NAV" href="#robo_top_of_doc">top</a>][<a class="NAV" href="./functions.html#top">index</a>]</p>
<p class="ITEM">NAME</p>
<span class="NAME"><pre class="NAME">   <strong>WriteData</strong>
</pre>
</span><p class="ITEM">DESCRIPTION</p>
<span class="DESCRIPTION"><pre class="DESCRIPTION">   Allows to write data from Standard Data File or Backup Data File
</pre>
</span><p class="ITEM">SYNOPSIS</p>
<span class="SYNOPSIS"><pre class="SYNOPSIS">   [[sprox_desfire.dll]]
   SWORD SPROX_Desfire_WriteData(BYTE file_id,
                                     BYTE comm_mode,
                                     DWORD from_offset,
                                     DWORD size,
                                     const BYTE data[]);

   [[sprox_desfire_ex.dll]]
   SWORD SPROXx_Desfire_WriteData(SPROX_INSTANCE rInst,
                                     BYTE file_id,
                                     BYTE comm_mode,
                                     DWORD from_offset,
                                     DWORD size,
                                     const BYTE data[]);

   [[pcsc_desfire.dll]]
   LONG  SCardDesfire_WriteData(SCARDHANDLE hCard,
                                     BYTE file_id,
                                     BYTE comm_mode,
                                     DWORD from_offset,
                                     DWORD size,
                                     const BYTE data[]);
</pre>
</span><p class="ITEM">INPUTS</p>
<span class="INPUTS"><pre class="INPUTS">   BYTE file_id      : File IDentifier
   BYTE comm_mode    : file's communication settings (DF_COMM_MODE_PLAIN, DF_COMM_MODE_MACED, 
                       DF_COMM_MODE_PLAIN2 or DF_COMM_MODE_ENCIPHERED)(see chapter 3.2 of 
                       datasheet of mifare DesFire MF3ICD40 for more information)
   DWORD from_offset : starting position for the write operation in bytes
   DWORD size        : size of the buffer in bytes
   BYTE data[]       : buffer to write to the card
</pre>
</span><p class="ITEM">RETURNS</p>
<span class="RETURNS"><pre class="RETURNS">   <a class="LINK_21" href="./desfire_card_h.html#robo77">DF_OPERATION_OK</a>   : success, data has been written
   Other code if internal or communication error has occured. 
</pre>
</span><p class="ITEM">SEE ALSO</p>
<span class="SEE_ALSO"><pre class="SEE ALSO">   <a class="LINK_37" href="#robo122">WriteData2</a>
</pre>
</span>


<h2><a name="robo122"><span class="TYPE">[Functions]</span><a class="LABEL" name="WriteData2">
WriteData2</a></h2>

<p class="NAV">[<a class="NAV" href="#robo_top_of_doc">top</a>][<a class="NAV" href="./functions.html#top">index</a>]</p>
<p class="ITEM">NAME</p>
<span class="NAME"><pre class="NAME">   <strong>WriteData2</strong>
</pre>
</span><p class="ITEM">DESCRIPTION</p>
<span class="DESCRIPTION"><pre class="DESCRIPTION">   Allows to write data from Standard Data File or Backup Data File
</pre>
</span><p class="ITEM">SYNOPSIS</p>
<span class="SYNOPSIS"><pre class="SYNOPSIS">   [[sprox_desfire.dll]]
   SWORD SPROX_Desfire_WriteData2(BYTE file_id,
                                     DWORD from_offset,
                                     DWORD size,
                                     const BYTE data[]);

   [[sprox_desfire_ex.dll]]
   SWORD SPROXx_Desfire_WriteData2(SPROX_INSTANCE rInst,
                                     BYTE file_id,
                                     DWORD from_offset,
                                     DWORD size,
                                     const BYTE data[]);

   [[pcsc_desfire.dll]]
   LONG  SCardDesfire_WriteData2(SCARDHANDLE hCard,
                                     BYTE file_id,
                                     DWORD from_offset,
                                     DWORD size,
                                     const BYTE data[]);
</pre>
</span><p class="ITEM">INPUTS</p>
<span class="INPUTS"><pre class="INPUTS">   BYTE file_id      : File IDentifier
   DWORD from_offset : starting position for the write operation in bytes
   DWORD size        : size of the buffer in bytes
   BYTE data[]       : buffer to write to the card
</pre>
</span><p class="ITEM">RETURNS</p>
<span class="RETURNS"><pre class="RETURNS">   <a class="LINK_21" href="./desfire_card_h.html#robo77">DF_OPERATION_OK</a>   : success, data has been written
   Other code if internal or communication error has occured. 
</pre>
</span><p class="ITEM">SEE ALSO</p>
<span class="SEE_ALSO"><pre class="SEE ALSO">   <a class="LINK_37" href="#robo121">WriteData</a>
</pre>
</span>
<hr />
Generated from <b>sprox_desfire_write.c</b> on Thu Jun 24 12:26:35 2010<br />
</body>
</html>
